package com.jack.lib

import com.jack.lib.core.net.JBaseData

/**
 * author : chong.huang
* create : 3/20/21
 * desc   :
 */
class BaseData<T> : JBaseData<T> {
    /**
     * code : 000'
     * msg : 成功
     * data : []
     */
    var code: Int = 0
    var retmsg: String? = null
    var data: T? = null
        private set

    override fun isSuccess(): Boolean {
       return code != 200
    }

    override fun code(): String? = code.toString()

    override fun message(): String? = retmsg

    override fun data(): T? = data
}